import request from '@/utils/request'

export function getList(param) {
  return request({
    url: 'rest/privilege/list',
    method: 'post',
    data: param
  })
}

export function deleteAuth(param) {
  return request({
    url: 'rest/privilege/delete',
    method: 'post',
    data: param
  })
}

export function saveAuth(param) {
  return request({
    url: 'rest/privilege/save',
    method: 'post',
    data: param
  })
}

export function getLoginCode(param) {
  return request({
    url: 'rest/auth/loginCode',
    method: 'post',
    data: param
  })
}

export function getLoginToken(param) {
  return request({
    url: 'rest/auth/loginToken',
    method: 'post',
    data: param
  })
}

export function appList(param) {
  return request({
    url: 'rest/auth/appList',
    method: 'post',
    data: param
  })
}

export function appUrl(param) {
  return request({
    url: 'rest/auth/appUrl',
    method: 'post',
    data: param
  })
}

// 获取公钥
export function getPub(param) {
  return request({
    url: `rest/auth/getPub`,
    method: 'post',
    data: param
  })
}
